inherited rstSalarySheet: TrstSalarySheet
  Left = 409
  Top = 259
  Width = 808
  Caption = #1056#1077#1077#1089#1090#1088' '#1079#1072#1088#1087#1083#1072#1090#1085#1099#1093' '#1074#1077#1076#1086#1084#1086#1089#1090#1077#1081
  Constraints.MinHeight = 500
  Constraints.MinWidth = 800
  OldCreateOrder = True
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited pStatusBar: TStatusBar
    Width = 800
  end
  inherited ToolBar1: TToolBar
    Width = 800
    inherited ToolButton1: TToolButton
      ParentShowHint = False
      ShowHint = True
    end
    inherited ToolButton2: TToolButton
      ParentShowHint = False
      ShowHint = True
    end
    inherited ToolButton3: TToolButton
      Action = aSave
      ParentShowHint = False
      ShowHint = True
    end
    inherited ToolButton8: TToolButton
      ParentShowHint = False
      ShowHint = True
    end
    inherited ToolButton7: TToolButton
      ParentShowHint = False
      ShowHint = True
    end
    inherited ToolButton10: TToolButton
      ParentShowHint = False
      ShowHint = True
    end
    inherited ToolButton11: TToolButton
      ParentShowHint = False
      ShowHint = True
    end
    object Panel1: TPanel
      Left = 216
      Top = 0
      Width = 157
      Height = 23
      BevelOuter = bvNone
      TabOrder = 0
      object dbcb_Peni: TDBCheckBoxEh
        Left = 16
        Top = 4
        Width = 113
        Height = 17
        AlwaysShowBorder = True
        Caption = #1053#1072#1095#1080#1089#1083#1103#1090#1100' '#1087#1077#1085#1080
        Checked = True
        Flat = True
        State = cbChecked
        TabOrder = 0
        ValueChecked = '1'
        ValueUnchecked = '0'
      end
    end
  end
  inherited Panel2: TPanel
    Left = 0
    Top = 25
    Width = 800
    Height = 569
    Align = alClient
    object Splitter2: TSplitter
      Left = 0
      Top = 415
      Width = 800
      Height = 5
      Cursor = crVSplit
      Align = alBottom
      Beveled = True
      MinSize = 150
    end
    object GroupBox2: TGroupBox
      Left = 0
      Top = 420
      Width = 800
      Height = 149
      Align = alBottom
      Caption = ' '#1055#1086#1076#1088#1086#1073#1085#1099#1081' '#1089#1087#1080#1089#1086#1082' '
      Constraints.MinHeight = 140
      TabOrder = 1
      object dbgDetail: TDBGridEh
        Left = 2
        Top = 15
        Width = 796
        Height = 132
        Align = alClient
        DataGrouping.GroupLevels = <>
        DataSource = dsc_Detail
        Flat = True
        FooterColor = clWindow
        FooterFont.Charset = DEFAULT_CHARSET
        FooterFont.Color = clWindowText
        FooterFont.Height = -11
        FooterFont.Name = 'MS Sans Serif'
        FooterFont.Style = []
        Options = [dgEditing, dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
        OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghAutoSortMarking, dghMultiSortMarking, dghRowHighlight, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
        PopupMenu = PopupMenu2
        RowDetailPanel.Color = clBtnFace
        SortLocal = True
        TabOrder = 0
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = []
        UseMultiTitle = True
        VTitleMargin = 5
        OnColEnter = dbgDetailColEnter
        OnSortMarkingChanged = dbgReferSortMarkingChanged
        Columns = <
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'NAME'
            Footers = <>
            Title.TitleButton = True
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'TABNUM'
            Footers = <>
            Title.TitleButton = True
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'SALDO'
            Footers = <>
            Title.TitleButton = True
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'CHARGE'
            Footers = <>
            Title.TitleButton = True
          end
          item
            EditButtons = <>
            FieldName = 'SUMMA'
            Footers = <>
            Title.TitleButton = True
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'ADDRESS'
            Footers = <>
            Title.TitleButton = True
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'MODIFIER'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'MODIFYDATE'
            Footers = <>
          end>
        object RowDetailData: TRowDetailPanelControlEh
        end
      end
    end
    object Panel3: TPanel
      Left = 0
      Top = 0
      Width = 800
      Height = 415
      Align = alClient
      BevelOuter = bvNone
      Constraints.MinHeight = 200
      TabOrder = 0
      object dbgRefer: TDBGridEh
        Left = 0
        Top = 50
        Width = 800
        Height = 365
        Align = alClient
        ColumnDefValues.Title.TitleButton = True
        DataGrouping.GroupLevels = <>
        DataSource = dscRefer
        Flat = True
        FooterColor = clWindow
        FooterFont.Charset = DEFAULT_CHARSET
        FooterFont.Color = clWindowText
        FooterFont.Height = -11
        FooterFont.Name = 'MS Sans Serif'
        FooterFont.Style = []
        Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
        OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghAutoSortMarking, dghMultiSortMarking, dghRowHighlight, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
        PopupMenu = PopupMenu1
        RowDetailPanel.Color = clBtnFace
        SortLocal = True
        TabOrder = 1
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = []
        UseMultiTitle = True
        VTitleMargin = 5
        OnDblClick = aEditExecute
        OnSortMarkingChanged = dbgReferSortMarkingChanged
        Columns = <
          item
            EditButtons = <>
            FieldName = 'EMPNAME'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'SALDO'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'CHARGE'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'SUMMA'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'STATUSNAME'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'BMONTH'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'BYEAR'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'DOCDATE'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'CREATER'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'CREATEDATE'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'MODIFIER'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'MODIFYDATE'
            Footers = <>
          end>
        object RowDetailData: TRowDetailPanelControlEh
        end
      end
      object GroupBox1: TGroupBox
        Left = 0
        Top = 0
        Width = 800
        Height = 50
        Align = alTop
        Caption = ' '#1060#1080#1083#1100#1090#1088' '
        TabOrder = 0
        object Label1: TLabel
          Left = 318
          Top = 24
          Width = 158
          Height = 13
          Caption = #1042#1077#1076#1086#1084#1086#1089#1090#1100' '#1089#1086#1079#1076#1072#1085#1072' '#1074' '#1087#1077#1088#1080#1086#1076' '#1089
        end
        object Label2: TLabel
          Left = 16
          Top = 24
          Width = 67
          Height = 13
          Caption = #1054#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
        end
        object Label3: TLabel
          Left = 580
          Top = 24
          Width = 12
          Height = 13
          Caption = #1087#1086
        end
        object lcb_Org: TDBLookupComboboxEh
          Left = 91
          Top = 20
          Width = 215
          Height = 19
          AlwaysShowBorder = True
          DropDownBox.SpecRow.CellsText = '---'
          DropDownBox.SpecRow.Value = -1
          DropDownBox.SpecRow.Visible = True
          EditButtons = <>
          Flat = True
          KeyField = 'ID'
          ListField = 'EMPNAME'
          ListSource = dsc_Orgs
          TabOrder = 0
          Visible = True
        end
        object dbt_Bdate: TDBDateTimeEditEh
          Left = 486
          Top = 20
          Width = 85
          Height = 19
          AlwaysShowBorder = True
          EditButtons = <>
          Flat = True
          Kind = dtkDateEh
          TabOrder = 1
          Visible = True
        end
        object dbt_Edate: TDBDateTimeEditEh
          Left = 600
          Top = 20
          Width = 85
          Height = 19
          AlwaysShowBorder = True
          EditButtons = <>
          Flat = True
          Kind = dtkDateEh
          TabOrder = 2
          Visible = True
        end
        object bbFind: TBitBtn
          Left = 696
          Top = 16
          Width = 77
          Height = 25
          Action = aRefresh
          Caption = #1055#1086#1080#1089#1082
          TabOrder = 3
          Glyph.Data = {
            36040000424D3604000000000000360000002800000010000000100000000100
            2000000000000004000000000000000000000000000000000000FF00FF00FFB8
            6B00FFA94A00FFA94A00FFA94A00FFA94A00FFA94A00FFA94A00FFA94A00FFA9
            4A00FFA94A00FFA94A00FFA94A00FF941F00FF00FF00FF00FF00FFAC5200FF96
            18003C915E00FFB65200FFB65200489A6A004297660042976600489A6A00FFB2
            4A00FFB24A00FFB24A00FFB24A00FF921000FFAC5200FF00FF00FF890800FFB6
            5A002B87500099CBAD0049A06E0095DAB70095DAB70095D8B50095D7B400489A
            6A00CCF2DE00FFB65A00F7B65200FFAE4A00FF890800FF00FF00FF8D0800FFB6
            5A002B87500099F0C50093DCB70040D48A0040D1880093E2B90093E2B90095D7
            B4002B875000F7AE5200F7AE4A00F7AE4A00FF8D0800FF00FF00FF8D0800FFB6
            5A002B87500099F0C5003FD4880040D0870097D8B6002B8750002B8750002B87
            500089BC9E002B875000F7AE4A00F7AE4A00FF8D0800FF00FF00FF8D0800F7AE
            52002B875000B0F3D30098EEC30099F0C5002B875000F7AA4A00F7AA4A00F7AA
            4A00429A68002B875000F7A64200F7A64200FF8D0800FF00FF00FF8D0800F7AA
            4A002B8750002B8750002B8750002B8750002B8750002B875000F7A24200F7A2
            4200F7A2420044986700EFA23900EF9E3900FF8D0800FF00FF00FF8D0800F7AA
            3900EFA23900EFA23900EF9E3900EF9E3900EF9E3900EF9E3900EF9E3900EF9A
            3900EF9A3900EF9A3100EF9A3100F7A62100FF890800FF00FF00FF8D0800FFC7
            3900FFC7310044986700F7AA3100EFA23100EF9A31002B8750002B8750002B87
            50002B8750002B8750002B875000FFBE1800FF890800FF00FF00FF8D0800FFCB
            4A00FFD34A002B875000429A6800FFCF4200FFCF4200FFCF39002B87500098EE
            C30095E5BD0094E0B9002B875000FFC32900FF890800FF00FF00FF890800FFCF
            5A00FFD763002B87500089BC9E002B8750002B8750002B87500097D8B60040D0
            87003FD4880095E5BD002B875000FFC73900FF890800FF00FF00FF890800FFD3
            6B00FFDF7300FFDF73002B875000B7EED30093E2B90093E2B90040D1880040D4
            8A0093DCB700BBF2D6002B875000FFC74A00FF890800FF00FF00FF890800FFCF
            7300FFE38C00FFE38C00CCF2DE00439D6A00BBF2D600B7EED300BBF2D600BBF2
            D60049A06E0099CBAD002B875000FFC75200FF890800FF00FF00FFAC5200FF9E
            2100FFCB7300FFD37B00FFD37B00FFD37B00489A6A004297660042976600489A
            6A00FFD37300FFD36B003C915E00FFAA3100FFAC5200FF00FF00FF00FF00FFB8
            6B00FFA94A00FFA94A00FFA94A00FFA94A00FFA94A00FFA94A00FFA94A00FFA9
            4A00FFA94A00FFA94A00FFA94A00FF941F00FF00FF00FF00FF00FF00FF00FF00
            FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
            FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
        end
      end
    end
  end
  inherited shblActionList: TActionList
    Left = 280
    Top = 1
    inherited aInsert: TAction
      Category = 'Refer'
      Hint = #1057#1086#1079#1076#1072#1090#1100' '#1085#1086#1074#1091#1102' '#1074#1077#1076#1086#1084#1086#1089#1090#1100
    end
    inherited aEdit: TAction
      Category = 'Refer'
      Caption = #1057#1092#1086#1088#1084#1080#1088#1086#1074#1072#1090#1100' '#1086#1087#1083#1072#1090#1099
      Hint = #1057#1092#1086#1088#1084#1080#1088#1086#1074#1072#1090#1100' '#1086#1087#1083#1072#1090#1099
    end
    inherited aDelete: TAction
      Category = 'Refer'
      Hint = #1059#1076#1072#1083#1080#1090#1100' '#1087#1091#1089#1090#1091#1102' '#1074#1077#1076#1086#1084#1086#1089#1090#1100
    end
    inherited aPost: TAction
      Category = 'Detail'
      Caption = #1057#1086#1093#1088#1072#1085#1080#1090#1100' '#1080#1079#1084#1077#1085#1077#1085#1080#1103
      Hint = #1057#1086#1093#1088#1072#1085#1080#1090#1100' '#1080#1079#1084#1077#1085#1077#1085#1080#1103
      OnExecute = nil
    end
    inherited aExit: TAction
      Caption = #1042#1099#1093#1086#1076
    end
    inherited aExport: TAction
      Caption = #1042#1099#1075#1091#1079#1080#1090#1100' '#1074' Excel'
      OnExecute = cgbcrf
    end
    object aDeleteDetail: TAction
      Category = 'Detail'
      Caption = #1059#1076#1072#1083#1080#1090#1100
      ImageIndex = 2
      OnExecute = aDeleteDetailExecute
    end
    object aDeleteAllDetail: TAction
      Category = 'Detail'
      Caption = #1059#1076#1072#1083#1080#1090#1100' '#1074#1089#1077
      ImageIndex = 2
      OnExecute = aDeleteAllDetailExecute
    end
    object aSave: TAction
      Category = 'Detail'
      Caption = #1057#1086#1093#1088#1072#1085#1080#1090#1100' '#1080#1079#1084#1077#1085#1077#1085#1080#1103
      Enabled = False
      Hint = #1057#1086#1093#1088#1072#1085#1080#1090#1100' '#1080#1079#1084#1077#1085#1077#1085#1080#1103
      ImageIndex = 0
      OnExecute = aPostExecute
    end
    object aExportDetail: TAction
      Caption = #1042#1099#1075#1091#1079#1080#1090#1100' '#1074' Excel'
      Hint = #1042#1099#1075#1091#1079#1080#1090#1100' '#1074' Excel'
      ImageIndex = 7
      OnExecute = aExportDetailExecute
    end
  end
  inherited dsRefer: TpFIBDataSet
    DeleteSQL.Strings = (
      'DELETE FROM'
      '  EMP_RESTR'
      'WHERE'
      '  EMP_REESTR_ID = :OLD_EMP_REESTR_ID'
      '    ')
    RefreshSQL.Strings = (
      
        'select er.emp_reestr_id, er.employ_id, er.saldo, er.charge, er.s' +
        'umma,'
      '       er.bmonth, er.byear, er.docdate,'
      
        '       (select rname from user_getfullname (er.createuserid)) as' +
        ' creater,'
      
        '       (select rname from user_getfullname (er.modifyuserid)) as' +
        ' modifier,'
      '       er.createdate, er.modifydate, er.status, r.empname,'
      
        '       iif (er.status = 1, '#39#1054#1087#1083#1072#1095#1077#1085#1086#39', '#39#1053#1077#1086#1087#1083#1072#1095#1077#1085#1086#39') as statusna' +
        'me'
      '  from emp_restr er, remployers r'
      '  where er.employ_id = r.id'
      '    and er.createdate between :pbdate and :pedate'
      '    and (:pemployer_id = -1 or r.id = :pemployer_id)'
      '    and ER.EMP_REESTR_ID = :OLD_EMP_REESTR_ID'
      '    '
      ''
      ''
      '')
    SelectSQL.Strings = (
      
        'select er.emp_reestr_id, er.employ_id, er.saldo, er.charge, er.s' +
        'umma,'
      '       er.bmonth, er.byear, er.docdate,'
      
        '       (select rname from user_getfullname (er.createuserid)) as' +
        ' creater,'
      
        '       (select rname from user_getfullname (er.modifyuserid)) as' +
        ' modifier,'
      '       er.createdate, er.modifydate, er.status, r.empname,'
      
        '       iif (er.status = 2, '#39#1054#1087#1083#1072#1095#1077#1085#1086#39', '#39#1053#1077#1086#1087#1083#1072#1095#1077#1085#1086#39') as statusna' +
        'me'
      '  from emp_restr er, remployers r'
      '  where er.employ_id = r.id'
      '    and er.createdate between :pbdate and :pedate'
      '    and (:pemployer_id = -1 or r.id = :pemployer_id)'
      ''
      ''
      '')
    BeforeOpen = dsReferBeforeOpen
    BeforeScroll = dsReferBeforeScroll
    UpdateTransaction = trWrite
    Left = 704
    Top = 176
    object dsReferEMP_REESTR_ID: TFIBIntegerField
      FieldName = 'EMP_REESTR_ID'
      Visible = False
    end
    object dsReferEMPLOY_ID: TFIBIntegerField
      FieldName = 'EMPLOY_ID'
      Visible = False
    end
    object dsReferEMPNAME: TFIBStringField
      DisplayLabel = #1054#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
      DisplayWidth = 25
      FieldName = 'EMPNAME'
      Size = 255
      EmptyStrToNull = True
    end
    object dsReferSALDO: TFIBBCDField
      DisplayLabel = #1057#1072#1083#1100#1076#1086
      FieldName = 'SALDO'
      Size = 2
      RoundByScale = True
    end
    object dsReferCHARGE: TFIBBCDField
      DisplayLabel = #1053#1072#1095#1080#1089#1083#1077#1085#1086
      FieldName = 'CHARGE'
      Size = 2
      RoundByScale = True
    end
    object dsReferSUMMA: TFIBBCDField
      DisplayLabel = #1057#1091#1084#1084#1072
      FieldName = 'SUMMA'
      Size = 2
      RoundByScale = True
    end
    object dsReferBMONTH: TFIBSmallIntField
      DisplayLabel = #1052#1077#1089#1103#1094
      FieldName = 'BMONTH'
    end
    object dsReferBYEAR: TFIBSmallIntField
      DisplayLabel = #1043#1086#1076
      FieldName = 'BYEAR'
    end
    object dsReferDOCDATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1076#1086#1082#1091#1084#1077#1085#1090#1072
      FieldName = 'DOCDATE'
    end
    object dsReferCREATER: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1083
      DisplayWidth = 20
      FieldName = 'CREATER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsReferCREATEDATE: TFIBDateField
      DisplayLabel = #1050#1086#1075#1076#1072' '#1089#1086#1079#1076#1072#1083
      FieldName = 'CREATEDATE'
    end
    object dsReferMODIFIER: TFIBStringField
      DisplayLabel = #1055#1086#1084#1077#1085#1103#1083
      DisplayWidth = 20
      FieldName = 'MODIFIER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsReferMODIFYDATE: TFIBDateField
      DisplayLabel = #1050#1086#1075#1076#1072' '#1087#1086#1084#1077#1085#1103#1083
      FieldName = 'MODIFYDATE'
    end
    object dsReferSTATUS: TFIBSmallIntField
      FieldName = 'STATUS'
      Visible = False
    end
    object dsReferSTATUSNAME: TFIBStringField
      DisplayLabel = #1057#1090#1072#1090#1091#1089
      FieldName = 'STATUSNAME'
      Size = 10
      EmptyStrToNull = True
    end
  end
  inherited dscRefer: TDataSource
    Left = 736
    Top = 176
  end
  inherited Timer1: TTimer
    Left = 248
    Top = 1
  end
  inherited trRefer: TpFIBTransaction
    Left = 672
    Top = 176
  end
  inherited PropStorage: TPropStorageEh
    Section = 'rstSalarySheet'
    StoredProps.Strings = (
      '<P>.Height'
      '<P>.Left'
      '<P>.PixelsPerInch'
      '<P>.Top'
      '<P>.Width'
      '<P>.WindowState'
      'Panel2.GroupBox2.dbgDetail.<P>.Columns.ColumnsIndex'
      'Panel2.GroupBox2.dbgDetail.<P>.Columns.<ForAllItems>.Width'
      'Panel2.Panel3.dbgRefer.<P>.Columns.ColumnsIndex'
      'Panel2.Panel3.dbgRefer.<P>.Columns.<ForAllItems>.Width'
      'ToolBar1.Panel1.dbcb_Peni.<P>.Checked')
    Left = 312
    Top = 1
  end
  object ds_Detail: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE EMP_REESTR_ABON'
      'SET '
      '    SUMMA = :SUMMA'
      'WHERE'
      '    EMP_REESTR_ID = :OLD_EMP_REESTR_ID'
      '    and ABONENT_ID = :OLD_ABONENT_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    EMP_REESTR_ABON'
      'WHERE'
      '        EMP_REESTR_ID = :OLD_EMP_REESTR_ID'
      '    and ABONENT_ID = :OLD_ABONENT_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO EMP_REESTR_ABON('
      '    EMP_REESTR_ID,'
      '    ABONENT_ID,'
      '    NAME,'
      '    TABNUM,'
      '    SALDO,'
      '    CHARGE,'
      '    SUMMA,'
      '    MODIFYDATE'
      ')'
      'VALUES('
      '    :EMP_REESTR_ID,'
      '    :ABONENT_ID,'
      '    :NAME,'
      '    :TABNUM,'
      '    :SALDO,'
      '    :CHARGE,'
      '    :SUMMA,'
      '    :MODIFYDATE'
      ')')
    RefreshSQL.Strings = (
      'select ra.emp_reestr_id, ra.abonent_id, ra.name,'
      '       ra.tabnum, ra.saldo, ra.charge, ra.summa,'
      
        '       (select rname from user_getfullname (ra.modifyuserid)) as' +
        ' modifier,'
      '       ra.modifydate,'
      '       v.address'
      'from emp_reestr_abon ra, v_abons v'
      '  where(  ra.abonent_id = v.id'
      '    and ra.emp_reestr_id = :emp_reestr_id'
      '     ) and (     RA.EMP_REESTR_ID = :OLD_EMP_REESTR_ID'
      '    and RA.ABONENT_ID = :OLD_ABONENT_ID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'select ra.emp_reestr_id, ra.abonent_id, ra.name,'
      '       ra.tabnum, ra.saldo, ra.charge, ra.summa,'
      
        '       (select rname from user_getfullname (ra.modifyuserid)) as' +
        ' modifier,'
      '       ra.modifydate,'
      '       v.address'
      'from emp_reestr_abon ra, v_abons v'
      '  where ra.abonent_id = v.id'
      '    and ra.emp_reestr_id = :emp_reestr_id')
    BeforeEdit = ds_DetailBeforeEdit
    Transaction = trRefer
    Database = MAINDM.pMainDatabase
    UpdateTransaction = trWrite
    OnFieldChange = ds_DetailFieldChange
    DataSource = dscRefer
    Left = 704
    Top = 208
    WaitEndMasterScroll = True
    dcForceOpen = True
    oRefreshAfterPost = False
    oFetchAll = True
    object ds_DetailEMP_REESTR_ID: TFIBIntegerField
      FieldName = 'EMP_REESTR_ID'
      ReadOnly = True
    end
    object ds_DetailABONENT_ID: TFIBIntegerField
      FieldName = 'ABONENT_ID'
      ReadOnly = True
    end
    object ds_DetailNAME: TFIBStringField
      DisplayLabel = #1060#1048#1054' '#1087#1083#1072#1090#1077#1083#1100#1097#1080#1082#1072
      DisplayWidth = 20
      FieldName = 'NAME'
      ReadOnly = True
      Size = 120
      EmptyStrToNull = True
    end
    object ds_DetailTABNUM: TFIBStringField
      DisplayLabel = #1058#1072#1073#1077#1083#1100#1085#1099#1081' '#8470
      FieldName = 'TABNUM'
      ReadOnly = True
      EmptyStrToNull = True
    end
    object ds_DetailSALDO: TFIBBCDField
      DisplayLabel = #1057#1072#1083#1100#1076#1086
      FieldName = 'SALDO'
      ReadOnly = True
      Size = 2
      RoundByScale = True
    end
    object ds_DetailCHARGE: TFIBBCDField
      DisplayLabel = #1053#1072#1095#1080#1089#1083#1077#1085#1086
      FieldName = 'CHARGE'
      ReadOnly = True
      Size = 2
      RoundByScale = True
    end
    object ds_DetailADDRESS: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089
      DisplayWidth = 30
      FieldName = 'ADDRESS'
      ReadOnly = True
      Size = 245
      EmptyStrToNull = True
    end
    object ds_DetailMODIFIER: TFIBStringField
      DisplayLabel = #1055#1086#1084#1077#1085#1103#1083
      DisplayWidth = 20
      FieldName = 'MODIFIER'
      ReadOnly = True
      Size = 150
      EmptyStrToNull = True
    end
    object ds_DetailMODIFYDATE: TFIBDateField
      DisplayLabel = #1050#1086#1075#1076#1072' '#1087#1086#1084#1077#1085#1103#1083
      FieldName = 'MODIFYDATE'
      ReadOnly = True
    end
    object ds_DetailSUMMA: TFIBBCDField
      DisplayLabel = #1057#1091#1084#1084#1072
      FieldName = 'SUMMA'
      Size = 2
      RoundByScale = True
    end
  end
  object dsc_Detail: TDataSource
    DataSet = ds_Detail
    Left = 736
    Top = 208
  end
  object PopupMenu1: TPopupMenu
    Left = 236
    Top = 194
    object N1: TMenuItem
      Action = aEdit
    end
    object N2: TMenuItem
      Action = aDelete
    end
  end
  object PopupMenu2: TPopupMenu
    Left = 312
    Top = 405
    object N3: TMenuItem
      Action = aDeleteDetail
    end
    object N4: TMenuItem
      Action = aDeleteAllDetail
    end
    object Excel1: TMenuItem
      Action = aExportDetail
    end
  end
  object ds_Orgs: TpFIBDataSet
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    EMPNAME,'
      '    CODE'
      'FROM'
      '    REMPLOYERS '
      'order by 2')
    Transaction = trRefer
    Database = MAINDM.pMainDatabase
    UpdateTransaction = trWrite
    Left = 704
    Top = 240
    oFetchAll = True
    object ds_OrgsID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_OrgsEMPNAME: TFIBStringField
      FieldName = 'EMPNAME'
      Size = 255
      EmptyStrToNull = True
    end
    object ds_OrgsCODE: TFIBIntegerField
      FieldName = 'CODE'
    end
  end
  object dsc_Orgs: TDataSource
    DataSet = ds_Orgs
    Left = 736
    Top = 240
  end
  object ds_NewPays: TpFIBDataSet
    SelectSQL.Strings = (
      'SELECT'
      '    RESULT,'
      '    SUMM_ALL'
      'FROM'
      '    PROC_EMP_REESTR_COMMIT(:P_EMP_REESTR_ID,'
      '    :PDATE, :ppeni) ')
    BeforeOpen = ds_NewPaysBeforeOpen
    Transaction = trWrite
    Database = MAINDM.pMainDatabase
    Left = 704
    Top = 274
    oFetchAll = True
    object ds_NewPaysRESULT: TFIBStringField
      FieldName = 'RESULT'
      Size = 1000
      EmptyStrToNull = True
    end
    object ds_NewPaysSUMM_ALL: TFIBBCDField
      FieldName = 'SUMM_ALL'
      Size = 2
      RoundByScale = True
    end
  end
  object SaveXLSDialog: TSaveDialog
    DefaultExt = 'xls'
    Filter = #1060#1072#1081#1083#1099' Excel (*.xls)|*.xls'
    Title = #1042#1099#1073#1086#1088' '#1092#1072#1081#1083#1072' '#1076#1083#1103' '#1074#1099#1075#1088#1091#1079#1082#1080' '#1076#1072#1085#1085#1099#1093
    Left = 240
    Top = 125
  end
  object XLSExportFile: TXLSExportFile
    Left = 240
    Top = 93
  end
  object XLSExportDBGridEh: TXLSExportDBGridEh
    XLSExportFile = XLSExportFile
    DBGridEh = dbgRefer
    Options = [eoptVisibleOnly]
    Left = 272
    Top = 93
  end
  object trWrite: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    AfterEnd = trWriteAfterEnd
    Left = 672
    Top = 208
  end
end
